<html>
<head><meta charset="utf-8"><title>Test case for #78448 · t-compiler/performance · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/index.html">t-compiler/performance</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html">Test case for #78448</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="214833154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214833154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214833154">(Oct 28 2020 at 13:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> The case for the foreign_modules change is in generated code. Unfortunately that code is not yet public. As long as my colleague is ok with it, we might be able to copy paste the code into a perf test case though.</p>



<a name="214833179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214833179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214833179">(Oct 28 2020 at 13:10)</a>:</h4>
<p>Yeah, either way I imagine we'll want to cut it down some</p>



<a name="214833217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214833217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214833217">(Oct 28 2020 at 13:11)</a>:</h4>
<p>we try to make test cases roughly &lt;= 1-2 seconds on perf for a check build</p>



<a name="214833246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214833246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214833246">(Oct 28 2020 at 13:11)</a>:</h4>
<p>just the final compilation that is, not the dependencies</p>



<a name="214833397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214833397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214833397">(Oct 28 2020 at 13:12)</a>:</h4>
<p>Luckily this test case is completely dependency free. Here's the generated code: <a href="https://gist.github.com/rylev/32b8ac3a4000ded6c2d5fbc153851bae">https://gist.github.com/rylev/32b8ac3a4000ded6c2d5fbc153851bae</a> It needs one additional struct definition to compile</p>



<a name="214833411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214833411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214833411">(Oct 28 2020 at 13:12)</a>:</h4>
<p>(I'll add that definition to the gist)</p>



<a name="214833827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214833827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214833827">(Oct 28 2020 at 13:16)</a>:</h4>
<p>sounds good. If you want to file an issue on rust-lang/rustc-perf that'd be enough, or you can add a benchmark -- I feel like you've done so before?</p>



<a name="214833900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214833900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214833900">(Oct 28 2020 at 13:16)</a>:</h4>
<p>I have done so before. I'm happy to add it (assuming I remember how everything works)</p>



<a name="214834185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214834185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214834185">(Oct 28 2020 at 13:19)</a>:</h4>
<p>thanks! happy to help of course</p>



<a name="214954829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214954829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214954829">(Oct 29 2020 at 11:36)</a>:</h4>
<p>I've submitted a PR for this test case. <a href="https://github.com/rust-lang/rustc-perf/pull/789">https://github.com/rust-lang/rustc-perf/pull/789</a></p>



<a name="214954909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/214954909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#214954909">(Oct 29 2020 at 11:37)</a>:</h4>
<p>The test case is pretty artificial but shows a similar issue to the actual code that prompted the fix.</p>



<a name="215311466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215311466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215311466">(Nov 02 2020 at 12:28)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Just an FYI that <a href="https://github.com/rust-lang/rustc-perf/pull/789">the test case</a> is ready for review. We're waiting on this merging before merging the <a href="https://github.com/rust-lang/rust/pull/78448">related rustc changes</a></p>



<a name="215311542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215311542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215311542">(Nov 02 2020 at 12:29)</a>:</h4>
<p>Oh, thanks for the ping. I guess I was waiting for ci or something</p>



<a name="215311648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215311648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215311648">(Nov 02 2020 at 12:30)</a>:</h4>
<p>Ok, merged. You'll want to wait a cycle or two for perf to pick it up.</p>



<a name="215311668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215311668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215311668">(Nov 02 2020 at 12:30)</a>:</h4>
<p>(perf build that is)</p>



<a name="215311697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215311697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215311697">(Nov 02 2020 at 12:30)</a>:</h4>
<p>Where can I see cycles in progress?</p>



<a name="215312415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215312415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215312415">(Nov 02 2020 at 12:38)</a>:</h4>
<p><a href="https://perf.rust-lang.org/status.html">https://perf.rust-lang.org/status.html</a>, and it looks like nothing is in progress right now so the next build should get it</p>



<a name="215334929"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215334929" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215334929">(Nov 02 2020 at 15:38)</a>:</h4>
<p>Results are looking good!</p>
<p><a href="/user_uploads/4715/LW7_pKABBpzQ57m9QbveAYKp/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/LW7_pKABBpzQ57m9QbveAYKp/image.png" title="image.png"><img src="/user_uploads/4715/LW7_pKABBpzQ57m9QbveAYKp/image.png"></a></div>



<a name="215335671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215335671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215335671">(Nov 02 2020 at 15:43)</a>:</h4>
<p>Yes! The nice thing is that it's looking pretty clear that performance is either not affected at all in other crates or (arguably) improves ever so slightly.</p>



<a name="215339036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215339036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215339036">(Nov 02 2020 at 16:07)</a>:</h4>
<p>Oh looks like the parent commit doesn't have data available for the <code>externs</code> case because it already ran last week.</p>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> Is there anyway we can fill in that missing data or do we need to do a whole new run?</p>



<a name="215339655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215339655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215339655">(Nov 02 2020 at 16:11)</a>:</h4>
<p>It should be possible -- let me try to queue it in manually.</p>



<a name="215339999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215339999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215339999">(Nov 02 2020 at 16:12)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> can you give me the sha of the parent commit?</p>



<a name="215340221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215340221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215340221">(Nov 02 2020 at 16:14)</a>:</h4>
<p>Sure <code>234099d1d12bef9d6e81a296222fbc272dc51d89</code></p>



<a name="215340229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215340229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215340229">(Nov 02 2020 at 16:14)</a>:</h4>
<p>thanks</p>



<a name="215340427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215340427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215340427">(Nov 02 2020 at 16:15)</a>:</h4>
<p>ok, hopefully did not break anything. should run now.</p>



<a name="215340688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/247081-t-compiler/performance/topic/Test%20case%20for%20%2378448/near/215340688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/247081-t-compiler/performance/topic/Test.20case.20for.20.2378448.html#215340688">(Nov 02 2020 at 16:17)</a>:</h4>
<p>That seemed to do the trick. Thanks <span class="user-mention" data-user-id="116122">@simulacrum</span>!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>